<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>展示数据</title>
    <link href="/static/js/resources/ext-theme-neptune/ext-theme-neptune-all.css" rel="stylesheet"/>
    <script src="/static/js/ext-all.js" type="text/javascript"></script>
    <script src="/static/js/locale/ext-lang-zh_CN.js" type="text/javascript"></script>
    <script src="/static/js/MyVTypes.js" type="text/javascript"></script>
    <script src="/static/js/utils.js" type="text/javascript"></script>

    <link href="/static/codemirror/lib/codemirror.css" rel="stylesheet"/>
    <link href="/static/codemirror/addon/hint/show-hint.css" rel="stylesheet"/>
    <link href="/static/codemirror/theme/idea.css" rel="stylesheet"/>

    <script src="/static/codemirror/lib/codemirror.js" type="text/javascript"></script>
    <script src="/static/codemirror/mode/sql/sql.js" type="text/javascript"></script>
    <script src="/static/codemirror/addon/hint/show-hint.js" type="text/javascript"></script>
    <script src="/static/codemirror/addon/hint/sql-hint.js" type="text/javascript"></script>
    <script src="/static/codemirror/addon/selection/active-line.js" type="text/javascript"></script>

    <script type="text/javascript">

        Ext.onReady(function () {
            function get_data() {
                var lst = [];
	            lst.push({name: '吴大富', value: '大帅哥！'});
	            lst.push({name: '吴大贵', value: '大美女！'});
	            return {data: lst};
            }

            var ShowWin = new Ext.Window({
                            title: '详情',
                            width: 730,
                            height: 468,
                            autoScroll: true,
                            maximizable: false,
                            resizable: true,
                            collapsible: true,
                            closeAction: 'hide',
                            closable: true,
                            modal: 'true',
                            buttonAlign: "center",
                            layout: 'fit',
                            bodyStyle: "padding:8px 8px 8px 8px",
                            bodyCfg: {
                                tag: 'center',
                                cls: 'x-panel-body',
                            },
                            contentEl: 'dawn_sql_show1'
                        });

            var tpl = new Ext.XTemplate(
				        '<table cellpadding="0" cellspacing="0" style="border:1px solid #b5e2ff;" width="630">',
                        '<tpl for="data">',
                        '<tr style="height:25px;">',
                        '<td class="t1" align="right">{name}：</td><td class="t2">&nbsp;&nbsp;<span>{value}</span></td>',
                        '</tr></tpl>',
                        '</table>'
				     );
				     tpl.overwrite(Ext.get("dawn_sql_show1"), get_data());

				     ShowWin.show();
            ShowWin.hide();
            Ext.get('btn_show').on('click', function () {
                ShowWin.show();
            });

            Ext.get('btn_hide').on('click', function () {
                ShowWin.hide();
            });

            Ext.get('btn_win').on('click', function () {
                window.open('http://127.0.0.1:8000/dawnclient/', 'DawnSql编辑器', 'top=0, left=0, toolbar=no, menubar=no, scrollbars=no, resizable=no, location=no, status=no');
            });
        });
    </script>
</head>
<body>
    <input type="button" id="btn_show" value="显示"/>
    <input type="button" id="btn_hide" value="隐藏"/>
    <br/>
    <input type="button" id="btn_win" value="显示 win"/>
    <div id="dawn_sql_show1"></div>
</body>
</html>







































